﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%namespace YouHP.Model%>
<%namespace YouHP.Model.Group%>
<%namespace YouHP.BLL%>

<%template _Header%>
<link rel="stylesheet" href="/support/common/jquery-ui.css" type="text/css" />
<script type="text/javascript" src="/support/common/jquery.js"></script>
<script type="text/javascript" src="/support/common/ui.core.js"></script>
<script type="text/javascript" src="/support/common/ui.draggable.js"></script> 
<script type="text/javascript" src="/support/common/ui.resizable.js"></script> 
<script type="text/javascript" src="/support/common/ui.dialog.js"></script> 

<script type="text/javascript">
var query = location.href.substring(location.href.indexOf("?")); 
function loadLogCommentList()
{
  
  var aurl = "/Pages/alpha/Ajax/LogCommentListAjax.aspx"+query+"&page=1";
  var myAjax=new Ajax(aurl,
  {
     method:'get',
     onComplete:function()
     {
      var html=this.response.text;
      _$("LogCommentList").innerHTML=html;
      }
   }
   );
   myAjax.request();
  
  
}  

function ViewLogCommentPage(pageindex)
{
  
  var aurl = "/Pages/alpha/Ajax/LogCommentListAjax.aspx"+query+"&page="+pageindex;
  var myAjax=new Ajax(aurl,
  {
     method:'get',
     onComplete:function()
     {
      var html=this.response.text;
      _$("LogCommentList").innerHTML=html;
      }
   }
   );
   myAjax.request();
  
  
} 


 
function LogCommentDelete(logCommentId)
{
  
  var aurl = "/Pages/alpha/Ajax/LogCommentDeleteAjax.aspx"+query+"&logCommentId="+logCommentId;
  var myAjax=new Ajax(aurl,
  {
     method:'get',
     onComplete:function()
     {
      var html=this.response.text;
      _$("LogCommentList").innerHTML=html;
      }
   }
   );
   myAjax.request();
  
  
} 


function LogCommentAdd(logId)
{
  
    var comment = _$("comment").value;
    if (comment.length == 0)
    {
        alert("评论内容不能为空！");
        return;
    }
    if(comment.length > 300 ) 
    {
        alert("评论内容不能超过300个字！");
        return;
    }
  
  _$("comment_submit").disabled = true;
  var aurl = "/Pages/alpha/Ajax/LogCommentAddAjax.aspx"+"?lid="+logId+"&comment="+comment.escUrl();
  var myAjax=new Ajax(aurl,
  {
     method:'post',
     onComplete:function()
     {
          var html=this.response.text;
          _$("LogCommentList").innerHTML=html;
          _$("comment").value="";
          _$("comment_submit").disabled = false;
      }
   }
   );
   myAjax.request();
  
  
}

function LogCommentReplyAdd(logId,logCommentId)
{

    var replycontent = _$("replycontent_"+logCommentId).value;
    if (replycontent.length == 0)
    {
        alert("回复内容不能为空！");
        return;
    }
    if(replycontent.length > 300 ) 
    {
        alert("回复内容不能超过300个字！");
        return;
    }
  
  _$("reply_submit_"+logCommentId).disabled = true;
  var aurl = "/Pages/alpha/Ajax/LogCommentAddAjax.aspx"+"?lid="+logId+"&parentId="+logCommentId+"&reply="+replycontent.escUrl();
  var myAjax=new Ajax(aurl,
  {
     method:'post',
     onComplete:function()
     {
          var html=this.response.text;
          _$("LogCommentList").innerHTML=html;
          _$("replycontent_"+logCommentId).value="";
          _$("reply_submit_"+logCommentId).disabled = false;
          _$("replybox_"+logCommentId).style.display = "none";
      }
   }
   );
   myAjax.request();
  
  
}

function replyLogComment(logCommentId)
{
    var e1 = document.getElementById('replybox_'+logCommentId); 
    var e2 = document.getElementById('replycontent_'+logCommentId); 
    e1.style.display = 'block';
    e2.focus();

 }
function replyCancell(logCommentId)
{
    var e1 = document.getElementById('replybox_'+logCommentId); 
    var e2 = document.getElementById('replycontent_'+logCommentId); 
    e1.style.display = 'none';
    e2.value = "";
}

loadLogCommentList();

</script>

<div class="layout2-cols2">
	
     <div class="col1">
		<%template _ProfileMenu%>
	</div>
	
	<div class="col2">
	
	<%csharp%>TempUrl = "/Profile/LogList.aspx?uid=" + ProfileData.Id;<%/csharp%>
	    
    <%csharp%>TempUrl = ModuleCtrl.Header7("Log","日志详情",this.GetUrl(TempUrl),">>日志列表"); <%/csharp%>
        {TempUrl}
			
				<div class="news">
				    <div class="logtitle">
                    <span>{logTopicData.Title}</span>&nbsp;
                     <%csharp%> TempUrl = logTopicData.PostTime.ToString("yyyy-MM-dd HH:mm"); <%/csharp%>
				      ({TempUrl}) &nbsp;

                          <a href="javascript:if({UserData.Id}<=0) alert('请先登录！');else showShareLogDialog({logTopicData.Id});"><font style="color:Green; font-size:14px;font-weight:bold;">[分享该日志]</font></a> 
				    </div>
				    <div>
				        {logTopicData.Body}
				        <%csharp%>if(tagArrSplit != null) { <%/csharp%>
			                <div class="tags">
			                <font color=black>搜索更多的相关文章:</font>&nbsp
			                <%csharp%>for(int i=0; i<tagArrSplit.Length; i++){
			                 TempUrl = "/Tag.aspx?tagname="+tagArrSplit[i];    
			                <%/csharp%>
			                <a href="{this.GetUrl(TempUrl)}" ><font color="red">{tagArrSplit[i]}</font></a>&nbsp
			                <%csharp%>}<%/csharp%>
			                </div>
			            <%csharp%>}<%/csharp%>
				    </div>
				</div>
	
    <%csharp%>TempUrl = ModuleCtrl.Footer("Log"); <%/csharp%>
       {TempUrl}

	
	    <div class="box">
	    <div class="pl">

		    <span name="fedbk" id="LogCommentList">
		    <div style="padding:20px 50px;">
		     <%csharp%> TempUrl = "/images/indicator_medium.gif";<%/csharp%>
		        <img src="{this.GetResource(TempUrl)}" /><b>正在加载评论……</b>
             
             </div>
		    </span>
	    </div>     
	    </div>
<style>
.hugbook a
{
	text-decoration:underline!important;
}

</style>
	    <div class="box">
	        <div class="caption">
	            发表评论：
	        </div>
	        <div class="content">
	                <div id="plshow">
	                    <div class="bor"> 
                             <textarea name="comment" rows="6" cols="80" id="comment"></textarea>
                        </div>
                        &nbsp;&nbsp;请文明参与讨论，禁止漫骂攻击。
                         <input name="sb" id="comment_submit" type="button" value="马上发表" onclick="LogCommentAdd({logTopicData.Id});"/>
                    </div>
            </div>
	    </div>
	           
	</div> 
	
</div>
<!--<div id="BOX_overlay" style="background: #000; position: absolute; z-index:100; filter:alpha(opacity=50);-moz-opacity: 0.6;opacity: 0.6;"></div>
-->
<div id="DIALOG"><iframe FRAMEBORDER=0 SCROLLING=NO ></iframe></div>
<script type="text/javascript" src="/support/Alpha/Js/float.js"></script>

<%template _footer%>		
